home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISOAPTransport.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  120 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2001
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsISOAPTransportListener;
  41. interface nsISOAPCall;
  42. interface nsISOAPResponse;
  43. interface nsISOAPResponseListener;
  44. interface nsISOAPCallCompletion;
  45.  
  46. [scriptable, uuid(99ec6695-535f-11d4-9a58-000064657374)]
  47. interface nsISOAPTransport : nsISupports {
  48.  
  49.   /**
  50.    * Send the specified message to the specified destination.
  51.    * This will fail if synchronous calls are not supported or if there is any
  52.    * failure in the actual message exchange.  Failure of the call itself will be
  53.    * contained in the response.
  54.    *
  55.    * @param aCall Actual message to be sent.
  56.    *
  57.    * @param aResponse Message to be recieved.  Calling synchronously assumes that 
  58.    *   exactly one response is expected.
  59.    */
  60.   void syncCall(in nsISOAPCall aCall, in nsISOAPResponse aResponse);
  61.  
  62.   /**
  63.    * Send the specified message to the specified destination synchronously waiting 
  64.    * for completion and any response.
  65.    * This will fail if there is any failure in the setup of the message exchange.
  66.    * Later errors will only be known through the response listener.  Failures of the
  67.    * call itself will be contained in the response passed to the response listener.
  68.    *
  69.    * @param aCall Actual message to be sent.
  70.    *
  71.    * @param aListener Handler to be invoked (single threaded) as each response is 
  72.    *  received and finally with null.  If specified as null, no responses are returned.
  73.    *
  74.    * @param response Message to recieve response and be handled by listener.  May be 
  75.    *   null if listener is null.
  76.    */
  77.   nsISOAPCallCompletion asyncCall(in nsISOAPCall aCall,
  78.                                   in nsISOAPResponseListener aListener,
  79.                                   in nsISOAPResponse aResponse);
  80.  
  81.   /**
  82.    * Add listener for unsolicited messages arriving on the transport.  Listeners
  83.    *  are provided with the opportunity to accept and process messages.  Typically
  84.    *  a listener will be a service dispatcher.  Listeners will be invoked in the
  85.    *  reverse order of declaration, allowing more local service dispatchers to
  86.    *  temporarily override permanent service dispatchers.  This will fail if the
  87.    *  desired listener was already added to the transport with the specified
  88.    *  capture flag or if the transport does not support incoming messages.
  89.    *
  90.    * @param aListener The listener to recieve unsolicited messages from the
  91.    *   transport.
  92.    *
  93.    * @param aCapture True if the listener should capture the message before
  94.    *   later-declared services.
  95.    */
  96.   void addListener(in nsISOAPTransportListener aListener,
  97.                    in boolean aCapture);
  98.  
  99.   /**
  100.    * Remove listener for unsolicited messages arriving on the transport.  This
  101.    *  will fail if the specified listener was not added with the specified
  102.    *  capture setting.
  103.    *
  104.    * @param aListener The listener to stop from recieving unsolicited messages 
  105.    *  from the transport.
  106.    *
  107.    * @param aCapture True if the listener was added to capture the message before
  108.    *   later-declared services (must be specified to remove, since a listener
  109.    *   may be registered as both).
  110.    */
  111.   void removeListener(in nsISOAPTransportListener aListener,
  112.                       in boolean aCapture);
  113. };
  114.  
  115. %{C++
  116. #define NS_SOAPTRANSPORT_CONTRACTID  \
  117. "@mozilla.org/xmlextras/soap/transport;1"
  118. #define NS_SOAPTRANSPORT_CONTRACTID_PREFIX   NS_SOAPTRANSPORT_CONTRACTID "?protocol="
  119. %}
  120.